package com.hue.springcloud.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import java.math.BigDecimal;

@Mapper
public interface AccountMapper {
    //修改账户余额
    @Update("update t_account set total=total-#{num} where user_id=#{userId}")
    public void updateAccount(@Param("userId")long userId, @Param("num")BigDecimal num);
}
